﻿@model ORM.Business.Models.Entities.GuideComment

    <fieldset>
        <table width="100%" style="vertical-align: top">
        <td style="width: 15%; vertical-align: top">
            <br />
            <center>
                <fieldset>
                @*    <input type="image" src="/Content/Images/Action-arrow-blue-up.ico" class="btnPlusPoint" id="@Model.Id" style="width: 30px; height: 30px;"/><br/>                 
                    <b id="answerPoint @Model.Id">@Model.UpVotes</b><br/> Điểm <br />
              *@  </fieldset>
                <a href="/Account/Detail?Id=@Model.PostBy.Id" style="text-decoration:none">@Model.PostBy.Username</a><br/>
                @Model.PostedDate.ToShortDateString()<br/>
                @Model.PostedDate.ToShortTimeString()<br/>
            </center>
            </td>
            <td style="width: 85%; border-left: 2px solid gainsboro; padding-left: 22px;">     
                    @Html.Raw(Model.ContentHtml)
                    <br/>
            </td>                     
        </table>
    </fieldset>
    <br />
   @* <script type="text/javascript">
    $(".btnPlusPoint").click(function() {
        //var _metaData = jQuery.metadata.get(this);
        var answerId = $(this).attr('id');
        var pointElementName = 'answerPoint ' + answerId;
        
        $.ajax({                    
            type: "POST",
            url: "@Url.Action("PlusPointForAnAnswer", "Question")",
            dataType: "json",
            data: {
                AnswerId: answerId
            },
            success: function(data) {
                if(data.message) {
                    alert(data.message);
                } else {
                     document.getElementById(pointElementName).innerHTML = data.newPoint;
                }
               
//                        var firstli = $('.comment-list li').first();
//                        $(firstli).show(200, function(){$(this).fadeTo(300,1)});

//                        if(data != "") {
//                            var total = parseInt($("#totalAnswer").html());
//                            $("#totalAnswer").html(total + 1);
//                        }
            },
            error: function(result, error) {
                alert(" Can't do because: " + error.responseText);
            },

            complete: function() {
//                        isPosting = false;
            }
        });
    });
</script>*@